package com.hjp.designmode.strategy;

import com.hjp.designmode.strategy.domain.impl.Order;
import com.hjp.designmode.strategy.strategy.Strategy;


/**
 * @Description:
 * @Author: huangjp6
 * @Date: 2022/3/7 14:59
 */
public class Context {
    private Strategy strategy;

    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    public double executeStrategy(Order order) {
        return strategy.countPrice(order);
    }
}
